package com.pioneer.web.sale.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pioneer.web.sale.domain.SalOrder;
import org.apache.ibatis.annotations.Mapper;

/**
 * SalOrderMapper
 *
 * @author hlm
 * @date 2025-04-30 15:09:18
 */
@Mapper
public interface SalOrderMapper extends BaseMapper<SalOrder> {

    /**
     * 查询指定日期最大订单编号
     * @param today 日期
     * @return 结果
     */
    String selectMaxCode(String today);

    /**
     * 根据销售订单ID查询详情
     * @param orderId 销售订单ID
     * @return 结果
     */
    SalOrder getOrderById(Long orderId);

    /**
     * 审批销售订单
     * @param approveOrder 销售订单
     * @return 结果
     */
    boolean approveOrder(SalOrder approveOrder);
}
